public class cuiew {

        public int numJewelsInStones(String jewels, String stones) {
            HashSet<Character> set = new HashSet<>();
            for(char i:jewels.toCharArray()){
                set.add(i);
            }
            int count = 0;
            for(char i:stones.toCharArray()){
                if(set.contains(i)){
                    count++;
                }
            }
            return count;
        }
    }

